Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Conversation

@zolkis
Copy link
Contributor

@zolkis zolkis commented Feb 2, 2018

Also, change Destination.destination to Destination.endpoint.

Reason for change: when multiple endpoints are supported with a Resource, (update) event observation would need a parameter for specifying the endpoint. This is not possible with events. Hence we need to remove the convenience feature for observing resource updates with an event listener. From now on the only way to observe resource updates is by specifying a listener to the retrieve() method, i.e. follow the CoAP observe pattern (make a retrieve request with the 'observe' flag turned on).

Signed-off-by: Zoltan Kis zoltan.kis@intel.com

…ination.destination to Destination.endpoint.

Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>

<a name="resource"></a>
### 1.4. The `Resource` dictionary
### 1.4. The `Resource` dictionarydestination

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dictionarydestination?

@gabrielschulhof
Copy link

What happens when you want to stop observing? How do you remove the callback?

@gabrielschulhof
Copy link

I was thinking that the callback might return a special value. That's what the lower level callback does: iotivity.OCStackApplicationResult.OC_STACK_DELETE_TRANSACTION to stop and ``iotivity.OCStackApplicationResult.OC_STACK_KEEP_TRANSACTION` to keep listening.

OTOH, our high-level solution so far has been to have an entity external to the callback add/remove the callback. This would allow the callback to be free of code wherein it decides whether to stay attached or not.

@zolkis
Copy link
Contributor Author

zolkis commented Feb 6, 2018

Based on the OCF Core spec, I expect that making a retrieve request without providing an observer (i.e. the observe flag) will stop observing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants